package com.efast.cafe.portal.controller.common;

import java.util.Date;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.cafe.util.UUIDUtils;
import com.efast.cafe.util.date.DateUtils;
/******************************************************************************
 * @File name : GenerateUUIDController.java
 * 
 * @Author : fxm
 * 
 * @Date : 2016-11-17
 * 
 * @Copyright Notice: Copyright (c) 2016 Efast Serv. All Rights Reserved. This
 *            software is published under the terms of the Efast Software
 *            License version 1.0, a copy of which has been included with this
 *            distribution in the LICENSE.txt file.
 * 
 * 
 *            ------------------------------------------------------------------
 *            ---------- Date Who Version Comments 2016-11-17 下午12:00:21 fxm 1.0
 *            Initial Version
 *****************************************************************************/
@Controller
public class GenerateUUIDController {

	/**
	 * 生成32+18 位唯一编码
	 * @return
	 */
	@RequestMapping("/frame_center/common/generateUUID")
	public @ResponseBody String generateUUID(){
		return UUIDUtils.getUUID32()+DateUtils.format(new Date(), DateUtils.FORMAT_DATE_YYYYMMDDHHMM_SSSSS);
	}
}
